<template>
  <div class="login">
    <h2>登录页面</h2>
    <button @click="loginClick">登录</button>
    <button @click="removeClick">退出登录</button>
  </div>
</template>

<script setup>
import { useRouter } from 'vue-router'
const router = useRouter()
function loginClick() {
  console.log('111')
  window.localStorage.setItem('token', '123')
  router.push({
    path: '/user',
  })
}
</script>

<style scoped></style>
